package com.atguigu.edu.service.impl;

import com.atguigu.edu.entity.EduVideo;
import com.atguigu.edu.mapper.EduVideoMapper;
import com.atguigu.edu.service.EduVideoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 课程视频 服务实现类
 * </p>
 *
 * @author alexzshl
 * @since 2021-05-04
 */
@Service
public class EduVideoServiceImpl extends ServiceImpl<EduVideoMapper, EduVideo> implements EduVideoService {

    @Override
    public void addLesson(EduVideo lesson) {
        this.save(lesson);
    }

    @Override
    public void updateLesson(EduVideo lesson) {
        this.updateById(lesson);
    }

    @Override
    public void deleteLesson(String lessonId) {
        this.removeById(lessonId);
        // TODO: 删除视频
    }
}
